<?php
ob_start();
session_start();
ini_set('display_errors', 1); 
ini_set('error_reporting', 'E_error'); 
$sessid=session_id();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>swapen.com - what's swapening?</title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="fadeslidehsow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<link rel="stylesheet" type="text/css" href="css/jmycarousel.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/facebox.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="js/jmycarousel.js"></script>
<script type="text/javascript" src="js/shCore.js"></script>
<script type="text/javascript" src="js/lab.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
</head>

<body>

<div align="center">
<div class="wrapper">

<?php require_once ("header1.php");?>
<?php 
	// 1:09 PM, May 29, 2011
	
	$is_pass_amazone_land = false;
	if( isset($_SESSION['user_id_sess']) ){
		$query = "SELECT set_api, comm_tokenID FROM tbl_users WHERE user_id =".$_SESSION['user_id_sess'];
		$sqlQuery = mysql_query($query);
		$fetchDataArr = mysql_fetch_array($sqlQuery);
		if( strtolower($fetchDataArr['set_api']) == 'yes' && $fetchDataArr['comm_tokenID'] != ''){
			$is_pass_amazone_land = true;
		}
	}
?>
<!--body start -->
<div class="body-m">
<?php if(!isset($_SESSION['user_id_sess']) && !isset($_GET['signup']) && !isset($_GET['registerChoicePage']) && !isset($_GET['registerChoicePage_merchant']) && !isset($_GET['registerChoicePage_wholeseller'])) { require_once("top_panel.php"); } ?>

<div class="clear" style="height:8px; line-height:8px;"></div>

					  <?php
					   if(isset($_GET['refer'])) {
					   include_once "refer.php";
					  }
					   if(isset($_GET['sell'])) {
							if( !$is_pass_amazone_land ) {
								include_once "amazon_land.php";
							}	
							else {
								require_once "sell_product.php";
								//echo '1';
							}
							
					  }
					  else if(isset($_GET['amazon_email'])) {
						 require_once "amazon_email.php";				 	
					  }
					  else if(isset($_GET['amazon_land'])) {
						 require_once "amazon_land.php";				 	
					  }
					  else if(isset($_GET['amazon_payment'])) {
						 require_once "amazon_payment.php";				 	
					  }
					  else if(isset($_GET['inbox'])) {
						if($_SESSION['user_type_sess']=='1')
						{
						$url1="index.php?mySwapen";
						$url="index.php?switchto";
					} else if($_SESSION['user_type_sess']=='2') {
						$url="index.php?mySwapen";
						$url1="index.php?switchto";
					} else if($_SESSION['user_type_sess']=='4') {
						$url="index.php?mySwapen";
						$url1="index.php?mySwapen&buyer";
					}
					else if($_SESSION['user_type_sess']=='5') {
						$url="index.php?mySwapen";
						$url1="index.php?mySwapen&buyer";
					}
						 require_once "inbox.php";				 	
					  }
					  else if(isset($_GET['resolution'])) {
						 require_once "resolution.php";				 	
					  }
					   else if(isset($_GET['read'])) {
						 require_once "read.php";				 	
					  }
					  else if(isset($_GET['reply'])) {
						 require_once "reply.php";				 	
					  }
					  else if(isset($_GET['post'])) {
						 require_once "post.php";				 	
					  }
					  else if(isset($_GET['profile'])) {
						 require_once "edit_profile.php";
					  }
					  else if(isset($_GET['update_login_details'])) {
						 require_once "edit_profile_login_details.php";
					  }
					  else if(isset($_GET['communications'])) {
						 require_once "communications_details.php";
					  }
					  else if(isset($_GET['token_id'])) {
						 require_once "token_id.php";				 	
					  }
					  else if(isset($_GET['comm_token_id'])) {
						 require_once "comm_token_id.php";				 	
					  }
					  else if(isset($_GET['viewpro'])) {
						 require_once "view_profile.php";
					  }
					  else if(isset($_GET['addProduct'])) {
						 require_once "product_to_sell.php";
					  }
					  else if(isset($_GET['srch'])) {
						 require_once "search_result.php";
					  }
					  else if(isset($_REQUEST['srchwhole'])) {
						 require_once "search_whole_result.php";
					  }
					   else if(isset($_GET['srchBuyer'])) {
					   if($_GET['sg']=="merchant") {
						 require_once "search_merchant.php";
						 }
						 else
						 {
						  require_once "search_buyer.php";
						 }
					  }
					  
					  else if(isset($_GET['postsearch'])) {
						 require_once "index.php";
					  }
					  else if(isset($_GET['srchPost'])) {
						 require_once "search_post.php";
					  }
					  else if(isset($_GET['showPost'])) {
						 require_once "show_post.php";
					  }
					  else if(isset($_GET['uploadFile'])) {
						 require_once "uploadFile.php";
					  }
					  else if(isset($_GET['spid'])) {
						 require_once "allseller_items.php";
					  }
					   else if(isset($_GET['wholeproducts'])) {
							if(!empty($_GET['wholeproducts'])) {
								require_once "view_whole_product.php";
							} 
					   }
					  else if(isset($_GET['products'])) {
						if(!empty($_GET['products'])) {
							require_once "view_product.php";
						}
						else {
							require_once "list_products.php"; 
						}	
					   }
					   else if(isset($_GET['products_old'])) {
						require_once "view_product_old.php";
					   }
					   else if(!empty($_GET['cat'])) {
							require_once "list_products.php";
					   }
					   else if(!empty($_GET['postcat'])) {
							require_once "list_post.php";
					   }
					   else if(!empty($_GET['subCat'])) {
							require_once "show_subcategories.php";
					   }
					   else if(isset($_GET['mylist'])) {
							require_once "my_listings.php";
							
					   }
					   else if(isset($_GET['editlist'])) {
							if(!empty($_GET['editlist'])) {
								require_once "edit_list.php";
							}
					   }
						else if(isset($_GET['whole_listing'])) {
							if(!empty($_GET['whole_listing'])) {
								require_once "whole_listings.php";
							}
					   }
						else if(isset($_GET['editwholeitem'])) {
							if(!empty($_GET['editwholeitem'])) {
								require_once "edit_wholesaleitem.php";
							}
					   }
					   else if(isset($_GET['wlist'])) {
							require_once "wishlist.php";
					   }
					   else if(!empty($_GET['wishproduct'])) {
							require_once "wishlist_product.php";					
					   }
						else if(!empty($_GET['wwishproduct'])) {
							require_once "wwishlist_product.php";					
					   }
						else if(!empty($_GET['editjob'])) {
							require_once "editjob.php";					
					   }
					   else if(isset($_GET['signout'])) {
							signout();
							if(!isset($_REQUEST['redi']))
							{
							    $_SESSION['viewcart']="";
							    echo "<script type='text/javascript'> window.location='index.php'; </script>";
							}
							else
							{
							   echo "<script type='text/javascript'> window.location='index.php?signin'; </script>";
							   $_SESSION['viewcart']=1;
							}
					   }			   
					   else if(isset($_GET['signin'])) {
							require_once "signin.php";
					   }
					  else if(isset($_GET['search'])) {
						 require_once "search_panel.php";
					  }
					  else if(isset($_GET['confirm'])) {
						require_once "confirm.php";
					  }
					  else if(isset($_GET['feedback'])) {
						require_once "show_feedback.php";
					  }	
					  else if(isset($_GET['SellProduct'])) {
						 require_once "product_to_view.php";
					  }
					  else if(isset($_GET['Postfeedback'])) {
						 require_once "post_feedback.php";
					  }
					  else if(isset($_GET['editSellingProduct'])) {
						 require_once "product_selling_edit.php";
					  }
					  else if(isset($_GET['viewItems'])) {
						 require_once "view_items.php";
					  }
					  else if(isset($_GET['confirmRegister'])) {
						require_once "confirm_register.php";
					  }
					  else if(isset($_GET['forgotPassword'])) {
						require_once "forgot_password.php";
					  }
					  else if(isset($_GET['forgotPasswordConfirm'])) {
						require_once "forgot_password_confirm.php";
					  }
					   else if(isset($_GET['passwordChange'])) {
						require_once "reset_password.php";
					  }
					   else if(isset($_GET['forgotUsername'])) {
						require_once "forgot_username.php";
					  }
					  else if(isset($_GET['forgotUsernameConfirm'])) {
						require_once "forgot_username_confirm.php";
					  }
					   else if(isset($_GET['usernameChange'])) {
						require_once "reset_username.php";
					  }
					  else if(isset($_GET['signup'])) {
					   require_once "signup.php";
					  } 
					  else if(isset($_GET['registerChoicePage'])){
						require_once "registerChoicePage.php";
					  }
					  else if(isset($_GET['registerChoicePage_merchant'])){
						require_once "registerChoicePage_merchant.php";
					  }
					  else if(isset($_GET['registerChoicePage_wholeseller'])){
						require_once "registerChoicePage_wholeseller.php";
					  }
					  else if(isset($_GET['policy'])) {
						include_once "privacy_policy.php";
					  } 
					  else if(isset($_GET['terms'])) {
						include_once "terms.php";
					  } 
					  else if(isset($_GET['contact'])) {
						include_once "contact.php";
					  } 
					  else if(isset($_GET['registerMember'])) {
						include_once "register_member.php";
					  }
                       else if(isset($_GET['registerMerchantRefCode'])) {
					   include_once "register_merchant_ref_code.php";
					   }
					   else if(isset($_GET['registerMerchant'])) {
					   include_once "register_merchant.php";
					   }
                       else if(isset($_GET['registerWholesellerRefCode'])) {
					   include_once "register_wholeseller_ref_code.php";
					   }
					   else if(isset($_GET['registerWholeseller'])) {
					   include_once "register_wholeseller.php";
					   }
					   else if(isset($_GET['import']))
					   {
					   if($_GET['import']==1)
					   {
						include_once "wholeseller_import.php";
						}
					   }
					  else if(isset($_GET['notFound'])) {
					   include_once "not_found.php";
					  }
					  else if(isset($_GET['faq'])) {
					   include_once "support/faq.php";
					  }
					  else if(isset($_GET['agreement'])) {
							include_once "support/agreements.php";
					  }
					   else if(isset($_GET['about'])) {
							include_once "about_swapen.php";
					  }
					  else if(isset($_GET['about'])) {
							include_once "about_swapen.php";
					  }
					  else if(isset($_GET['switchto'])) {
							include_once "change_user_type.php";
					  }
					  else if(isset($_GET['store'])) {
							include_once "add_seller_store.php";
					  }
					  else if(!empty($_GET['updstore'])) {
						include_once "edit_seller_store.php";
					  }
					  else if(isset($_GET['cart'])) {
					   include_once "cart.php";
					  }
					  else if(isset($_GET['checkout'])) {
					   include_once "checkout.php";
					  }
					   else if(isset($_GET['order'])) {
					   include_once "order.php";
					  }
					  else if(isset($_GET['cancelled'])) {
					   include_once "cancelled.php";
					  }
					  else if(isset($_GET['sell_page'])) {
						require_once "sell.php";
					  }
					  else if(isset($_GET['process'])) {
					   include_once "cancelled.php";
					  }
					  else {
						if(isset($_GET['mySwapen'])) {
								if($_SESSION['user_type_sess']=='1') {
									$url1="index.php?mySwapen";
									$url="index.php?switchto";
								} else if($_SESSION['user_type_sess']=='2') {
									$url="index.php?mySwapen";
									$url1="index.php?switchto";
								} else if($_SESSION['user_type_sess']=='4') {
									$url="index.php?mySwapen";
									$url1="index.php?mySwapen&buyer";
								}
								else if($_SESSION['user_type_sess']=='5') {
									$url="index.php?mySwapen";
									$url1="index.php?mySwapen&buyer";
								}
								?><div class='mypg_left_out'><? include("mypg_left.php");?></div>
								<div class='fullbox_out'><a name="mswapen" id="mswapen"></a>
									<?php
												
								if($_SESSION['user_type_sess']=='1') {
									include("my_swapen_seller.php");
									include("panel_wishlist.php");
									include("myswapen_refcomm.php");
									include("feedback_pending_merc.php");
									include("tran_history.php");
									include("post_listing.php");		
									include("panel_product.php");
								}
								else if($_SESSION['user_type_sess']=='2') {
									 include("my_swapen_seller.php");
									 include("listing_seller.php");
									 include("myswapen_refcomm.php");
									 include("comm_pay.php");
									 include("feedback_pending_merc.php");
									 include("post_listing.php");		
									 include("tran_history.php");
									 include("panel_product.php");
								}
								else if($_SESSION['user_type_sess']=='3') {
									 include("my_swapen_merchant.php");
									 include("listing_merchant.php");
									 include("comm_pay.php");
									 include("post_listing.php");
									 include("myswapen_refcomm.php");
									 include("tran_history.php");
									 include("feedback_pending_merc.php");
									 include("panel_mwishlist.php");
									 include("panel_product.php");
								}
								else if($_SESSION['user_type_sess']=='4') {
									if(isset($_GET['buyer'])) {
										include("my_swapen_seller.php");
										include("panel_wishlist.php");
										include("myswapen_refcomm.php");
										include("feedback_pending_merc.php");
										include("tran_history.php");
										include("post_listing.php");		
										include("panel_product.php");
									} else {
										include("my_swapen_seller.php");
										include("listing_seller.php");
										include("myswapen_refcomm.php");
										include("comm_pay.php");
										include("feedback_pending_merc.php");
										include("post_listing.php");		
										include("tran_history.php");
										include("panel_product.php");
									}
								}
								else if($_SESSION['user_type_sess']=='5') { 
									if(isset($_GET['buyer'])) { 
										include("feedback_pending_merc.php");
										include("post_listing.php");		
										include("panel_wishlist.php");
										include("panel_product.php");
									} else {
									include("my_swapen_wholesaler.php");
										include("listing_seller.php");
										include("post_listing.php");	
										include("feedback_pending_merc.php");
										include("tran_history.php");
                                        include("panel_product.php");										
								}
								}
								?>
								</div> <?php 
						}
						else {
							require_once ("front2_page.php");
						}
					  }
					  ?>

<div class="clear" style="height:20px; line-height:20px;"></div>

<?php if(empty($_GET)) {  require_once ("product_strip.php"); } ?>

</div><!--body end -->
<?php require_once("footer.php");?>
<div align="center" class="copy">Copyright &copy; 2011 swapen.com, All rights reserved.</div>

<div class="clear" style="height:10px; line-height:10px;"></div>

</div><!--main wrapper end -->
</div><!--align center end -->
</body>
</html>